package com.ybox.auth.form;

import com.ybox.common.core.constant.UserConstants;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;

/**
 * 用户注册对象
 *
 * @author ych
 */
public class RegisterBody extends LoginBody {
    /**
     * 确认密码
     */
    private String confirmPassword;

    private String uuid;

    private String code;


    public interface register {

    }
    @NotBlank(message = "密码不能为空")
    @Length(min = UserConstants.PASSWORD_MIN_LENGTH, max = UserConstants.PASSWORD_MAX_LENGTH, message = "密码不在指定范围", groups = {RegisterBody.register.class})
    public String getConfirmPassword() {
        return confirmPassword;
    }

    public void setConfirmPassword(String confirmPassword) {
        this.confirmPassword = confirmPassword;
    }

    @NotBlank(message = "uuid不能为空")
    @Length(message = "密码不在指定范围", groups = {RegisterBody.register.class})
    public String getUuid() {
        return uuid;
    }

    public void setUuid(String uuid) {
        this.uuid = uuid;
    }

    @NotBlank(message = "uuid不能为空")
    @Length(message = "密码不在指定范围", groups = {RegisterBody.register.class,LoginBody.login.class})
    public String getCode() {
        return code;
    }

    public void setCode(String code) {
        this.code = code;
    }
}
